<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />

<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/datepicker.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>

<style>
table tr[class=fields] th {
	color: #A65BC1;
	font-size: 16px;
	font-weight: bold;
	text-align: center;
}

table tr th {
	color: #999;
	font-size: 14px;
	font-weight: bold;
	text-align: right;
	width: 15%;
}
</style>
<script>
var contextPath='${contextPath}';
var addOffice = function(){
	window.location.href="${contextPath}/index/work_load.htm";
}
function starquery(){
	var start = $("#start_date").val();
	var username = $("#keuser").val();
	var param_str = "";
	
	if( !empty( start ) ) param_str += "&start=" + start;
	if( !empty( username ) ) param_str += "&username=" + username;
	
	location.href = "?" + param_str;
}

$(function(){
	$("#keuser").val('${username}');
})

</script>
</head>
<body>
	<div id="container">
		<div id="title"></div>
		<table class="form_table">
			<tr>
				<td>
					<label>查询时间：</label><input type="text" id="start_date" size="15" value="${cdate}" rel="DATE::Y-m"/>
					<label>咨询老师：</label>

			<#if flag =="1">
                <select name="keuser" id="keuser">
                    <option value="">-- 请选择咨询老师--</option>
					<#if uList??>
						<#list uList as list>
                            <option value="${list.username}">${list.name}</option>
							</#list>
					</#if>
                </select>
			<#else >
					<select name="keuser" id="keuser">
		                	<option value="">-- 请选择咨询老师--</option>
		                	<#if uList??>
								<#list uList as list>
		                			<option value="${list.username}">${list.nickname}（${list.regions}-${list.departments}-${list.job}）</option>
		                		</#list>
		                	</#if>
		             </select>
			</#if>

					<input type="button" value=" 查询 " onclick="starquery()">
				</td>
			</tr>
		</table>
		<table>

			<#if flag =="1">
                <tr class="fields">
                    <th width="20%">咨询老师</th>
                    <th width="20%">招生经理评分</th>
                    <th width="20%">说明</th>
                    <th width="20%">操作</th>
                </tr>

				<#if list??>
					<#list list as list>
                        <tr>
                            <td class="stress" style="text-align: center;">${list.nickname}</td>
                            <td style="text-align: center;">${list.director} 分</td>
                            <td style="text-align: center;">${list.msg1}</td>
                            <td align="center" style="text-align: center;"><a href="${contextPath}/index/grade.htm?id=${list.id}">修改信息</a></td>
                        </tr>
					</#list>
				<#else>
                    <tr><td colspan="5">暂未添加老师评分记录。</td></tr>
				</#if>
			<#elseif  flag=="2">
			<tr class="fields">
				<th width="20%">咨询老师</th>
				<th width="20%">中心主任评分</th>
				<th width="20%">说明</th>
				<th width="20%">操作</th>
			</tr>
			
			<#if list??>
				<#list list as list>
				<tr>
					<td class="stress" style="text-align: center;">${list.nickname}</td>
					<td style="text-align: center;">${list.director} 分</td>
                    <td style="text-align: center;">${list.msg1}</td>
					<td align="center" style="text-align: center;"><a href="${contextPath}/index/center_score.htm?id=${list.id}">修改信息</a></td>
				</tr>
				</#list>
			<#else>
				<tr><td colspan="5">暂未添加老师评分记录。</td></tr>
			</#if>

			<#elseif  flag=="3">
                <tr class="fields">
                    <th width="20%">咨询老师</th>
                    <th width="20%">主管领导评分</th>
                    <th width="20%">说明</th>
                    <th width="20%">操作</th>
                </tr>

				<#if list??>
					<#list list as list>
                        <tr>
                            <td class="stress" style="text-align: center;">${list.nickname}</td>
                            <td style="text-align: center;">${list.charge} 分</td>
                            <td style="text-align: center;">${list.msg2}</td>
                            <td align="center" style="text-align: center;"><a href="${contextPath}/index/supervisor_score.htm?id=${list.id}">修改信息</a></td>
                        </tr>
					</#list>
				<#else>
                    <tr><td colspan="5">暂未添加老师评分记录。</td></tr>
				</#if>
			</#if>
		</table>
		</div>
		<div id="pager">
		<ul id="pagination">
			<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/look_grade.htm?currPage=${currpage-1}&flag=${flag}">上一页</a></li>
					</#if>
					
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/look_grade.htm?currPage=${index_up}&flag=${flag}">${index_up}</a></li>
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/look_grade.htm?currPage=${index_up}&flag=${flag}">${index_up}</a></li>
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/look_grade.htm?currPage=${pagetotal}&flag=${flag}">${pagetotal}</a></li>
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/look_grade.htm?currPage=1&flag=${flag}">1</a></li>
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/look_grade.htm?currPage=${index_up}&flag=${flag}">${index_up}</a></li>
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/look_grade.htm?currPage=${pagetotal}&flag=${flag}">${pagetotal}</a></li>
			<#else>
				<li><a href="${contextPath}/index/look_grade.htm?currPage=1&flag=${flag}">1</a></li>
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/look_grade.htm?currPage=${index_up}&flag=${flag}">${index_up}</a></li>
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/look_grade.htm?currPage=${currpage+1}&flag=${flag}">下一页</a></li>
		</#if>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
		</ul>
	</div>
</body>
</html>